﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;

using System.Text;
using System.Windows.Forms;
using Atechnology.glassCAD.Shapes;

namespace ITAP.ShprossesBuilder.Editor
{
    public partial class AddShapeForm : Form
    {
        private int spacerWidth;

        public int SpacerWidth
        {
            get { return spacerWidth; }
        }

        private int horizontalIndex;

        public int HorizontalIndex
        {
            get { return horizontalIndex; }
        }

        private int verticalIndex;

        public int VerticalIndex
        {
            get { return verticalIndex; }
        }

        private Shape selectedShape = null;

        public Shape SelectedShape
        {
            get { return selectedShape; }
        }

        public AddShapeForm()
        {
            InitializeComponent();
        }

        private void buttonShowShape_Click(object sender, EventArgs e)
        {
            
            Shape shape = Shape.Get(new Param(), ProgramType.Glass, int.Parse(comboBoxShapeNumbers.Text));
            if (shape.ShowDialog() == DialogResult.OK)
            {
                selectedShape = shape;
                this.Close();
                horizontalIndex = (int)numericUpDownHorizontal.Value;
                verticalIndex = (int)numericUpDownVertical.Value;
                spacerWidth = (int)numericUpDownSpacerWidth.Value;
            }
        }

        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {

        }
    }
}
